{% extends "personal_center/base.html" %}

{% block page_link %}
    <script type="text/javascript" src="../../static/personal_center/js/jquery.min.js"></script>
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
    <link rel="stylesheet" href="../../static/personal_center/css/multiple-select.min.css">
    <link rel="stylesheet" href="../../static/personal_center/css/index.css">
{% endblock %}


{% block style %}
    <style>
        ::-webkit-scrollbar{  width: 6px; height: 6px;}
        ::-webkit-scrollbar-track { background-color: white;}
        ::-webkit-scrollbar-thumb{  border-radius:5px; background-color: #00688B;}

        * {
            margin:0;
            padding:0;
        }

        #YB_mulu div{
            font-size:0;
            overflow: hidden;white-space: nowrap;text-overflow:ellipsis;
        }

        .module1:hover {
            background: #DFDFDF;
        }

        #DB_mulu div{
            font-size:0;
            overflow: hidden;white-space: nowrap;text-overflow:ellipsis;
        }

        .module2:hover {
            background: #DFDFDF;
        }

        #LH_mulu div{
            font-size:0;
            overflow: hidden;white-space: nowrap;text-overflow:ellipsis;
        }

        .module3:hover {
            background: #DFDFDF;
        }

        .add_class {
            background: #1E90FF;
        }

        tr {
            height: 35px;
        }

        th {
            text-align: center;
        }

        table {
            table-layout: fixed;
        }

        td:first-child, th:first-child {
            position: sticky;
            left: 0; /* 首行永远固定在左侧 */
            z-index: 1;
        }

        thead tr th {
            position: sticky;
            top: 0; /* 列首永远固定在头部  */
            background-color: #E8E8E8;
        }

        th:first-child {
            z-index: 2;
        }

        .model_li {
            color: #3f414d;
            width: 25%;
            cursor: pointer;
            display: none;
        }

        .top_tag {
            border-bottom: #01AAED solid 2px;
            color: #01AAED;
        }

        .tab_top {
            width: 100px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            display: inline-block;
            cursor: pointer;
        }

        #addForm {
            width: 800px;
            height: 620px;
            background: #F5F5F5;
            position: absolute;
            border: #dfdfdf solid 1px;
            margin: auto;
            border-radius: 3px;
            top: 50%;
            left: 50%;
            /* 实现鼠标拖拽使用css3效果 */
            transform: translate(-50%, -50%);
            display: none;
            z-index: 10100;
            font-size: 0;
        }

        /* 标题 */
        #title {
            display: flex;
            justify-content: space-between;
            box-sizing: border-box;
            padding: 0 10px;
            height: 50px;
            color: #0b0b0b;
            cursor: move;
            /*border: #dfdfdf solid 1px;*/
            width: 100%;background: #f4f7fa;border-top-left-radius: 5px;border-top-right-radius: 5px;
        }

        .shade {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(36, 36, 36, 0.5);
            display: none;
            z-index: 10000;
        }

        .module1 {
            width: 100%;
            height: 40px;
            line-height: 40px;
        }

        .module2 {
            width: 100%;
            height: 40px;
            line-height: 40px;
        }

        .module3 {
            width: 100%;
            height: 40px;
            line-height: 40px;
        }
    </style>
{% endblock %}


{% block right_content %}
    <div class="headline">
        <div id="my_application_tab" onclick="change_mind('my_application')" class="tab_top top_tag">
            院办议题
        </div>
        <div id="new_issues_tab" onclick="change_mind('new_issues')" class="tab_top">
            党办议题
        </div>
        <div id="administrative_meetings_tab" onclick="change_mind('administrative_meetings')" class="tab_top">
            行政例会
        </div>


        {% if button_flag %}
            <div style="width: 110px;float: right;text-align: center;margin-right: 10px;">
                <button onclick="but_click('YB_mulu')" id="print" style="border-radius: 3px;border: #1E90FF solid 0.5px;width: 90px;height: 30px;margin-top: 5px;background-color: #1E90FF;color: white;">打印</button>
            </div>

            <div style="width: 110px;float: right;text-align: center;">
                <button onclick="" onmousemove="page_meet()" onmouseout="page_meet_none()" style="border-radius: 3px;border: #13ce66 solid 0.5px;width: 90px;height: 30px;margin-top: 5px;background-color: #13ce66;color: white;">上会</button>
                <div id="Meeting" onmousemove="page_meet()" onmouseout="page_meet_none()" style="z-index: 1000; position: absolute; width: 90px; height: 90px;right: 6.8%; top: 80px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;display: none">
                    <div style="margin-top: 10px;">
                        <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #00a0e9 solid 1px;background-color: #00a0e9;color: white;" id="sahnghui" onclick="will_fun('yb')">正常上会</button>
                    </div>
                    <div style="margin-top: 10px;">
                        <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;" id="sh_buttons" onclick="cx_sh_yb()">临时上会</button>
                    </div>
                </div>
            </div>

            <div style="width: 110px;float: right;text-align: center;">
                <button onclick="IssueShelved()" id="" style="border-radius: 3px;border: #0d7862 solid 0.5px;width: 90px;height: 30px;margin-top: 5px;background-color: #0d7862;color: white;">搁置议题</button>
            </div>
        {% endif %}
    </div>

    <div id="new_models1" class="shade">
        <div id="new_models" style="width: 100%;height: 100%;position: absolute;">
            <div style="width: 500px;background: #F5F5F5;z-index: 10000;position: absolute;top: 50%;left: 50%;transform:translate(-50%,-50%);border-radius: 3px;border: #dfdfdf solid 1px;">
                <div id="box" style="width: 100%;height: 40px;background: #f4f7fa;cursor: move;border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom: #cfcfcf solid 1px;">
                    <h5 id="modal-title" class="modal-title"
                        style="line-height: 40px;width: 15%;margin-left: 1%;display: inline-block;">议题上会</h5>
                    <span onclick="close_models()"
                          style="float: right;line-height: 40px;padding-right: 2%;cursor: pointer;"><i
                            class="iconfont icon-quchu"></i></span>
                </div>
                <div style="width: 100%;padding-top: 2%;padding-left: 2%;">
                    <div style="margin-top: 2%;">
                        <label for=""><span style="color: red;">* </span><p style="display: inline-block;letter-spacing: 2px;">开会时间：</p></label>
                        <input style="border-radius: 3px;border: #dfdfdf solid 1px;height: 35px;padding-right: 1px;width: 350px;outline: none;"
                               class="input-style" type="text" name="car_start" id="time_start"
                               placeholder="请选择开会时间" autocomplete="off">
                    </div>

                    <div style="margin-top: 2%;">
                        <label for=""><span style="color: red;">* </span><p style="display: inline-block;letter-spacing: 2px;">会议地点：</p></label>
                        <select name="" id="meeting_root" style="width: 350px;border-radius: 3px;border: #dfdfdf solid 1px;height: 35px;padding-right: 1px;outline: none;">
                            <option value="行政楼七楼大会议室">行政楼七楼大会议室</option>
                            <option value="内科楼十楼会议室">内科楼十楼会议室</option>
                            <option value="党员活动室">党员活动室</option>
                            <option value="小会议室">小会议室</option>
                        </select>
                    </div>

                    <div style="margin-top: 2%;">
                        <label for=""><span style="color: red;">* </span>主&nbsp;&nbsp;持&nbsp;&nbsp;人：</label>
                        <select name="" id="ConferenceHost" style="width: 350px;border-radius: 3px;border: #dfdfdf solid 1px;height: 35px;padding-right: 1px;outline: none;">
                            <option value="0">请选择会议主持人</option>
                            {% for leader in leader_obj %}
                                <option value="{{ leader.id }}">{{ leader.real_name }}</option>
                            {% endfor %}
                        </select>
                    </div>
                    {% if yb_flag == 'true' %}
                        <div style="width: 100%;">
                            <label for=""><span style="color: red;">* </span>参会领导：</label>
                            <div style="width: 100%;padding-left: 3%;">
                                {% for leader in leader_obj %}
                                    <div style="width: 80px;display: inline-block;vertical-align: top;"><input type="checkbox" class="AttendingLeaders" value="{{ leader.id }}"> {{ leader.real_name }}</div>
                                {% endfor %}
                            </div>
                        </div>
                    {% endif %}

                    <div style="margin-top: 2%;">
                        <label for=""><span style="color: red;">* </span><p style="display: inline-block;letter-spacing: 2px;">短信通知：</p></label>
                        <input type="radio" name="notification" value="1" checked> 是
                        <input type="radio" name="notification" value="0" style="margin-left: 15px;"> 否
                    </div>

                </div>
                <div style="width: 100%;height: 40px;text-align: right;padding-right: 2%;margin-top: 2%;border-top: #cfcfcf solid 1px;">
                    <button id="iss_summit_but" style="width: 100px;height: 30px;border: #dfdfdf solid 1px;margin-top: 5px;border-radius: 3px;background: #1E90FF;color: white;">
                        提交
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div id="new_models2" class="shade">
        <div id="new_models3" style="width: 100%;height: 100%;position: absolute;">
            <div style="width: 500px;height: 300px;background: #F5F5F5;z-index: 10000;position: absolute;top: 50%;left: 50%;transform:translate(-50%,-50%);border-radius: 3px;border: #dfdfdf solid 1px;">
                <div id="box3"
                     style="width: 100%;height: 50px;background: #f4f7fa;cursor: move;border-top-left-radius: 5px;border-top-right-radius: 5px;">
                    <h5 id="modal-title" class="modal-title"
                        style="line-height: 50px;width: 15%;margin-left: 1%;display: inline-block;">议题备注</h5>
                    <span onclick="close_models3()" style="float: right;line-height: 50px;padding-right: 2%;cursor: pointer;"><i class="iconfont icon-quchu"></i></span>
                </div>
                <hr>
                <div style="height: 200px;width: 100%;padding-top: 2%;padding-left: 2%;">
                    <div style="margin-top: 2%;">
                        <label for=""><span style="color: red;">* </span>是否搁置议题：</label>
                        <input type="radio" name="shelve" value="1" checked> 是 <input type="radio" name="shelve" value="0" style="margin-left: 15px;"> 否
                    </div>

                    <div style="margin-top: 2%;">
                        <p><span style="color: red;">* </span>议&nbsp;&nbsp;题&nbsp;&nbsp;备&nbsp;&nbsp;注：</p>
                        <textarea name="" id="remarks" cols="30" rows="3" style="width: 98%;height: 100px;outline: none;border: #cfcfcf solid 1px;"></textarea>
                    </div>
                </div>
                <hr>
                <div style="width: 100%;height: 50px;text-align: right;padding-right: 2%;">
                    <button id="iss_summit_but3" style="width: 100px;height: 30px;border: #dfdfdf solid 1px;margin-top: 10px;border-radius: 3px;background: #1E90FF;color: white;">
                        提交
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div id="my_application" style="width: 100%;height: 94.5%;overflow: auto;background-color: white;letter-spacing: 0;">
        <div style="width: 100%;height: 94%;">
            <div style="width: 100%;height: 40px;line-height: 40px;text-align: center;">
                <h3 style="display: inline-block;">院长办公会议题目录</h3>
                {% if button_flag %}
                    <button style="float: right;height: 30px;margin-top: 5px;border-radius: 4px;background-color: #1E90FF;color: white;border: #1E90FF solid 1px;width: 100px;line-height: 20px;margin-right: 1%;" onmousemove="page_zhanshi('yb')" onmouseout="page_yincang('yb')">下载文件</button>
                    <div id="page_one" style="z-index: 1000; position: absolute; width: 100px; height: 100px;right: 18px; top: 120px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;display: none" onmousemove="page_zhanshi('yb')" onmouseout="page_yincang('yb')">
                        <div style="margin-top: 10px;">
                            <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #00a0e9 solid 1px;background-color: #00a0e9;color: white;" onclick="primary_file('yb')">会议文件</button>
                        </div>
                        <div>
                            <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;" onclick="DownloadExcel('yb')">会议目录</button>
                        </div>
                    </div>
                {% endif %}
            </div>
            <hr>
            <div id="YB_mulu" style="width: 100%;height: 100%;overflow: auto;margin-top: 5px;"><!--startprint-->
                <div id="container" style="width: 100%;">
                    <div style="width: 100%;height: 40px;">
                        <div style="width: 100%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;text-align: center;">
                            <strong id="yb_title" style="font-size: 20px;">{{ now_year }}年第{{ Yb_meet_num }}次院长办公会</strong>
                        </div>
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <div style="width: 3%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;"></div>
                        <div style="width: 3%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                            <input id="yb_qx" onclick="check_all_select(this.id)" type="checkbox" style="margin-top: 3px;">
                        </div>
                        <div style="width: 3%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">序号</div>
                        <div style="width: 24%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">议题名称</div>
                        <div style="width: 5%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">议题类型</div>
                        <div style="width: 13%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">议题编号</div>
                        <div style="width: 10%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交科室</div>
                        <div style="width: 5%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交人</div>
                        <div style="width: 11%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交时间</div>
                        <div style="width: 11%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">审核时间</div>
                        <div style="width: 5%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">汇报人</div>
                        <div style="width: 7%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">操作</div>
                    </div>

                    {% for Yb in YbAllList %}
                        <div class="module1" style="width: 100%;">
                            <div style="width: 3%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;cursor: move;">
                                <i style="font-size: 14px;" class="gm-icon gm-icon-move"></i>
                            </div>
                            <div style="width: 3%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                                <input type="checkbox" class="check-box" id="{{ Yb.id }}" style="margin-top: 3px;">
                            </div>
                            <div class="YbSerial" style="width: 3%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Yb.serial_number }}</div>
                            <div style="width: 24%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;padding-left: 3px;" title="{{ Yb.name }}"><a href="SubjectDetailst.html?views=1&id={{ Yb.id }}">{{ Yb.name }}</a></div>
                            <div style="width: 5%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Yb.topic_type }}">{{ Yb.topic_type }}</div>
                            <div style="width: 13%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Yb.number }}">{{ Yb.number }}</div>
                            <div style="width: 10%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Yb.dep }}</div>
                            <div style="width: 5%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Yb.tjr }}</div>
                            <div style="width: 11%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Yb.tjsj }}</div>
                            <div style="width: 11%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Yb.shsj }}</div>
                            <div style="width: 5%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Yb.hbr }}</div>
                            <div style="width: 7%;height: 40px;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                                {% if button_flag %}
                                    <p style="cursor: pointer;color: #0d8ddb;display: inline-block;" onclick="model_line('{{ Yb.id }}')">议题备注</p>
                                {% else %}
                                    <a href="SubjectDetailst.html?views=1&id={{ Yb.id }}">查看</a>
                                {% endif %}
                            </div>
                        </div>
                    {% endfor %}
                </div><!--endprint-->
            </div>
        </div>
    </div>

    <div id="new_issues" style="width: 100%;height: 94.5%;overflow: auto;display: none;background-color: white;letter-spacing: 0;">
        <div style="width: 100%;height: 94%;">
            <div style="width: 100%;height: 40px;line-height: 40px;text-align: center;">
                <h3 style="display: inline-block;">党委会议题目录</h3>
                {% if button_flag %}
                    <button style="float: right;height: 30px;margin-top: 5px;border-radius: 4px;background-color: #1E90FF;color: white;border: #1E90FF solid 1px;width: 100px;line-height: 20px;margin-right: 1%" onmousemove="page_zhanshi('db')" onmouseout="page_yincang('db')">下载文件</button>
                    <div id="page_two" style="z-index: 1000; position: absolute; width: 100px; height: 100px;right: 18px; top: 120px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;display: none" onmousemove="page_zhanshi('db')" onmouseout="page_yincang('db')">
                        <div style="margin-top: 10px;">
                            <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #00a0e9 solid 1px;background-color: #00a0e9;color: white;" onclick="primary_file('db')">会议文件</button>
                        </div>
                        <div>
                            <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;" onclick="DownloadExcel('db')">会议目录</button>
                        </div>
                    </div>
                {% endif %}
            </div>
            <hr>
            <div id="DB_mulu" style="width: 100%;height: 100%;overflow: auto;margin-top: 5px;"><!--startprint-->
                <div id="container1" style="width: 100%;">
                    <div style="width: 100%;height: 40px;">
                        <div style="width: 100%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;text-align: center;">
                            <strong id="db_title" style="font-size: 20px;">{{ now_year }}年第{{ Db_meet_num }}次党委会</strong>
                        </div>
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;"></div>
                        <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                            <input id="db_qx" onclick="check_all_select1(this.id)" type="checkbox" style="margin-top: 3px;">
                        </div>
                        <div style="width: 4%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">序号</div>
                        <div style="width: 24%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">议题名称</div>
                        <div style="width: 12%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">议题编号</div>
                        <div style="width: 7%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交科室</div>
                        <div style="width: 5%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交人</div>
                        <div style="width: 9%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交时间</div>
                        <div style="width: 9%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">审核时间</div>
                        <div style="width: 8%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">汇报人</div>
                        <div style="width: 9%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">是否通过院长办公会</div>
                        <div style="width: 7%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">操作</div>
                    </div>

                    {% for Db in DbAllList %}
                        <div class="module2" style="width: 100%;">
                            <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;cursor: move;">
                                <i style="font-size: 14px;" class="gm-icon gm-icon-move"></i>
                            </div>
                            <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                                <input type="checkbox" class="check-box1" id="{{ Db.id }}" style="margin-top: 3px;">
                            </div>
                            <div class="DbSerial" style="width: 4%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Db.serial_number }}</div>
                            <div style="width: 24%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;padding-right: 3px;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Db.name }}">
                                <a href="SubjectDetailst.html?views=1&id={{ Db.id }}">{{ Db.name }}</a>
                            </div>
                            <div style="width: 12%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Db.number }}">{{ Db.number }}</div>
                            <div style="width: 7%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Db.dep }}">{{ Db.dep }}</div>
                            <div style="width: 5%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Db.tjr }}">{{ Db.tjr }}</div>
                            <div style="width: 9%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Db.tjsj }}">{{ Db.tjsj }}</div>
                            <div style="width: 9%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Db.shsj }}">{{ Db.shsj }}</div>
                            <div style="width: 8%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Db.hbr }}">{{ Db.hbr }}</div>
                            <div style="width: 9%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                                {% if Db.is_yb %}
                                    <input id="CC-{{ Db.id }}" onclick="pass_yb(this.id)" type="checkbox" checked>
                                    {% else %}
                                    <input id="CC-{{ Db.id }}" onclick="pass_yb(this.id)" type="checkbox">
                                {% endif %}
                            </div>
                            <div style="width: 7%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                                {% if button_flag %}
                                    <p style="cursor: pointer;color: #0d8ddb;display: inline-block;" onclick="model_line('{{ Db.id }}')">议题备注</p>
                                {% else %}
                                    <a href="SubjectDetailst.html?views=1&id={{ Db.id }}">查看</a>
                                {% endif %}
                            </div>
                        </div>
                    {% endfor %}
                </div><!--endprint-->
            </div>
        </div>
    </div>

    <div id="administrative_meetings" style="width: 100%;height: 94.5%;overflow: auto;display: none;background-color: white;letter-spacing: 0;">
        <div style="width: 100%;height: 94%;">
            <div style="width: 100%;height: 40px;line-height: 40px;text-align: center;">
                <h3 style="display: inline-block;">行政例会议题目录</h3>
                {% if button_flag %}
                    <button style="float: right;height: 30px;margin-top: 5px;border-radius: 4px;background-color: #1E90FF;color: white;border: #1E90FF solid 1px;width: 100px;line-height: 20px;margin-right: 1%;" onmousemove="page_zhanshi('xz')" onmouseout="page_yincang('xz')">下载文件</button>
                    <div id="page_three" style="z-index: 1000; position: absolute; width: 100px; height: 100px;right: 18px; top: 120px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;display: none" onmousemove="page_zhanshi('xz')" onmouseout="page_yincang('xz')">
                        <div style="margin-top: 10px;">
                            <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #00a0e9 solid 1px;background-color: #00a0e9;color: white;" onclick="primary_file('xz')">会议文件</button>
                        </div>
                        <div>
                            <button style="width: 80px;height: 30px;line-height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;" onclick="DownloadExcel('xz')">会议目录</button>
                        </div>
                    </div>
                {% endif %}
            </div>
            <hr>
            <div id="LH_mulu" style="width: 100%;height: 100%;overflow: auto;margin-top: 5px;"><!--startprint-->
                <div id="container2" style="width: 100%;">
                    <div style="width: 100%;height: 40px;">
                        <div style="width: 100%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;text-align: center;">
                            <strong id="xz_title" style="font-size: 20px;">{{ now_year }}年第{{ Xz_meet_num }}次行政例会</strong>
                        </div>
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;"></div>
                        <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                            <input id="xz_qx" onclick="check_all_select3(this.id)" type="checkbox" style="margin-top: 3px;">
                        </div>
                        <div style="width: 4%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">序号</div>
                        <div style="width: 28%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">议题名称</div>
                        <div style="width: 13%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">议题编号</div>
                        <div style="width: 10%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交科室</div>
                        <div style="width: 5%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交人</div>
                        <div style="width: 11%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">提交时间</div>
                        <div style="width: 11%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">审核时间</div>
                        <div style="width: 5%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">汇报人</div>
                        <div style="width: 7%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">操作</div>
                    </div>

                    {% for Xz in XzAllList %}
                        <div class="module3" style="width: 100%;">
                            <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;cursor: move;">
                                <i style="font-size: 14px;" class="gm-icon gm-icon-move"></i>
                            </div>
                            <div style="width: 3%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                                <input type="checkbox" class="check-box3" id="{{ Xz.id }}" style="margin-top: 3px;">
                            </div>
                            <div class="XzSerial" style="width: 4%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">{{ Xz.serial_number }}</div>
                            <div style="width: 28%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;padding-left: 3px;" title="{{ Xz.name }}"><a href="SubjectDetailst.html?views=1&id={{ Xz.id }}">{{ Xz.name }}</a></div>
                            <div style="width: 13%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Xz.number }}">{{ Xz.number }}</div>
                            <div style="width: 10%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Xz.dep }}">{{ Xz.dep }}</div>
                            <div style="width: 5%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Xz.tjr }}">{{ Xz.tjr }}</div>
                            <div style="width: 11%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Xz.tjsj }}">{{ Xz.tjsj }}</div>
                            <div style="width: 11%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Xz.shsj }}">{{ Xz.shsj }}</div>
                            <div style="width: 5%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;" title="{{ Xz.hbr }}">{{ Xz.hbr }}</div>
                            <div style="width: 7%;height: 100%;line-height: 40px;border: #0b0b0b solid 1px;border-top: none;border-left: none;text-align: center;color: #0b0b0b;display: inline-block;vertical-align: top;font-size: 14px;">
                                {% if button_flag %}
                                    <p style="cursor: pointer;color: #0d8ddb;display: inline-block;" onclick="model_line('{{ Xz.id }}')">议题备注</p>
                                {% else %}
                                    <a href="SubjectDetailst.html?views=1&id={{ Xz.id }}">查看</a>
                                {% endif %}
                            </div>
                        </div>
                    {% endfor %}
                </div><!--endprint-->
            </div>
        </div>
    </div>

    <iframe id="iframe1" style="display: none"></iframe>
{% endblock %}

{% block script %}
    <script type="text/javascript" src="../../static/personal_center/js/other/jquery.js"></script>
    <script src="../../static/administrative/layDate-v5.0.9/laydate/laydate.js"></script> <!-- 改成你的路径 -->
    <script type="text/javascript" src="../../static/personal_center/js/multiple-select.min.js"></script>
    <script src="../../static/system_setup/creat_from/js/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="../../static/drag_sort/Sortable.min.js"></script>
    <script type="text/javascript" src="../../static/drag_sort/moduleSet.min.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
            document.getElementById("personage").className = "add_class";
            document.getElementById("sponsor").className = "add-nav-active";
            permissions_validation();
        };

        // 排序
        var container = document.getElementById("container");
        var sort = Sortable.create(container, {
            animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
            handle: ".module1", // Restricts sort start click/touch to the specified element
            draggable: ".module1", // Specifies which items inside the element should be sortable
            onUpdate: function (evt/**Event*/) {
                var item = evt.item; // the current dragged HTMLElement
                var YbSerialList = document.getElementsByClassName("YbSerial");
                for (var yb_number=0; yb_number<YbSerialList.length; yb_number++) {
                    YbSerialList[yb_number].innerHTML = yb_number + 1
                }
            }
        });

        // 排序
        var container1 = document.getElementById("container1");
        var sort1 = Sortable.create(container1, {
            animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
            handle: ".module2", // Restricts sort start click/touch to the specified element
            draggable: ".module2", // Specifies which items inside the element should be sortable
            onUpdate: function (evt/**Event*/) {
                var item1 = evt.item; // the current dragged HTMLElement
                var DbSerialList = document.getElementsByClassName("DbSerial");
                for (var db_number=0; db_number<DbSerialList.length; db_number++) {
                    DbSerialList[db_number].innerHTML = db_number + 1
                }
            }
        });

        // 排序
        var container2 = document.getElementById("container2");
        var sort2 = Sortable.create(container2, {
            animation: 150, // ms, animation speed moving items when sorting, `0` — without animation
            handle: ".module3", // Restricts sort start click/touch to the specified element
            draggable: ".module3", // Specifies which items inside the element should be sortable
            onUpdate: function (evt/**Event*/) {
                var item2 = evt.item; // the current dragged HTMLElement
                var XzSerialList = document.getElementsByClassName("XzSerial");
                for (var xz_number=0; xz_number<XzSerialList.length; xz_number++) {
                    XzSerialList[xz_number].innerHTML = xz_number + 1
                 }
            }
        });

        function swapNode(node1, node2) {
            //获取父结点
            var _parent = node1.parentNode;
            //获取两个结点的相对位置
            var _t1 = node1.nextSibling;
            var _t2 = node2.nextSibling;
            //将node2插入到原来node1的位置
            if (_t1) _parent.insertBefore(node2, _t1);
            else _parent.appendChild(node2);
            //将node1插入到原来node2的位置
            if (_t2) _parent.insertBefore(node1, _t2);
            else _parent.appendChild(node1);
        }

        function permissions_validation() {
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/system-setup/permissions_validation");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send("permissions_type=议题目录");
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        permissions = JsonDate['permissions'];
                        if (permissions['院办议题']){
                            document.getElementById("my_application").style.display = "inline-block";
                            document.getElementById("my_application_tab").className = "tab_top top_tag";
                            document.getElementById("new_issues").style.display = "none";
                            document.getElementById("new_issues_tab").className = "tab_top";
                            document.getElementById("administrative_meetings").style.display = "none";
                            document.getElementById("administrative_meetings_tab").className = "tab_top";
                            document.getElementById("print").setAttribute("onclick", "but_click('YB_mulu')");
                            document.getElementById("sahnghui").setAttribute("onclick", "will_fun('yb')");
                            document.getElementById("sh_buttons").setAttribute('onclick', "cx_sh_yb()");
                            return false
                        }
                        if (permissions['党办议题']){
                            document.getElementById("new_issues").style.display = "inline-block";
                            document.getElementById("new_issues_tab").className = "tab_top top_tag";
                            document.getElementById("my_application").style.display = "none";
                            document.getElementById("my_application_tab").className = "tab_top";
                            document.getElementById("administrative_meetings").style.display = "none";
                            document.getElementById("administrative_meetings_tab").className = "tab_top";
                            document.getElementById("print").setAttribute("onclick", "but_click('DB_mulu')");
                            document.getElementById("sahnghui").setAttribute("onclick", "will_fun('db')");
                            document.getElementById("sh_buttons").setAttribute('onclick', "cx_sh_dw()");
                            return false
                        }
                        if (permissions['行政例会']){
                            document.getElementById("administrative_meetings").style.display = "inline-block";
                            document.getElementById("administrative_meetings_tab").className = "tab_top top_tag";
                            document.getElementById("my_application_tab").className = "tab_top";
                            document.getElementById("my_application").style.display = "none";
                            document.getElementById("new_issues_tab").className = "tab_top";
                            document.getElementById("new_issues").style.display = "none";
                            document.getElementById("print").setAttribute("onclick", "but_click('LH_mulu')");
                            document.getElementById("sahnghui").setAttribute("onclick", "will_fun('xz')");
                            document.getElementById("sh_buttons").setAttribute('onclick', "cx_sh_xz()");
                            return false
                        }
                    }
                }
             };
        }

        function online_tag(iss_type, iss_id_list, file_name) {
            document.getElementById("new_models1").style.display = "table-row";
            document.getElementById("iss_summit_but").setAttribute("onclick", "will_meeting('"+iss_type+"', " + JSON.stringify(iss_id_list) + ", '" + file_name +"')")
        }

        let title = document.querySelector("#box");
        let addForm = document.querySelector("#new_models");

        title.addEventListener("mousedown", function (e) {
            let x = e.pageX - addForm.offsetLeft;
            let y = e.pageY - addForm.offsetTop;

            document.addEventListener("mousemove", move);
            function move(e) {
                addForm.style.left = e.pageX - x + 'px';
                addForm.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        let title3 = document.querySelector("#box3");
        let addForm3 = document.querySelector("#new_models3");

        title3.addEventListener("mousedown", function (e) {
            let x = e.pageX - addForm3.offsetLeft;
            let y = e.pageY - addForm3.offsetTop;

            document.addEventListener("mousemove", move);
            function move(e) {
                addForm3.style.left = e.pageX - x + 'px';
                addForm3.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        function change_mind(ele_id) {
            if (ele_id === "my_application") {
                if (!permissions['院办议题']){
                    alert("您的访问权限不足!");
                    return false
                }
                document.getElementById("my_application").style.display = "inline-block";
                document.getElementById("my_application_tab").className = "tab_top top_tag";
                document.getElementById("new_issues").style.display = "none";
                document.getElementById("new_issues_tab").className = "tab_top";
                document.getElementById("administrative_meetings").style.display = "none";
                document.getElementById("administrative_meetings_tab").className = "tab_top";
                document.getElementById("print").setAttribute("onclick", "but_click('YB_mulu')");
                document.getElementById("sahnghui").setAttribute("onclick", "will_fun('yb')");
                document.getElementById("sh_buttons").setAttribute('onclick', "cx_sh_yb()");
            } else if (ele_id === "new_issues"){
                if (!permissions['党办议题']){
                    alert("您的访问权限不足!");
                    return false
                }
                document.getElementById("new_issues").style.display = "inline-block";
                document.getElementById("new_issues_tab").className = "tab_top top_tag";
                document.getElementById("my_application").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top";
                document.getElementById("administrative_meetings").style.display = "none";
                document.getElementById("administrative_meetings_tab").className = "tab_top";
                document.getElementById("print").setAttribute("onclick", "but_click('DB_mulu')");
                document.getElementById("sahnghui").setAttribute("onclick", "will_fun('db')");
                document.getElementById("sh_buttons").setAttribute('onclick', "cx_sh_dw()");
            }else {
                if (!permissions['行政例会']){
                    alert("您的访问权限不足!");
                    return false
                }
                document.getElementById("administrative_meetings").style.display = "inline-block";
                document.getElementById("administrative_meetings_tab").className = "tab_top top_tag";
                document.getElementById("my_application_tab").className = "tab_top";
                document.getElementById("my_application").style.display = "none";
                document.getElementById("new_issues_tab").className = "tab_top";
                document.getElementById("new_issues").style.display = "none";
                document.getElementById("print").setAttribute("onclick", "but_click('LH_mulu')");
                document.getElementById("sahnghui").setAttribute("onclick", "will_fun('xz')");
                document.getElementById("sh_buttons").setAttribute('onclick', "cx_sh_xz()");
            }
        }

        function but_click(ele_id) {
            if (ele_id === 'YB_mulu') {
                var data_list = {{ YbAllList | safe }};
                var dir_title = "{{ now_year }}年第{{ Yb_meet_num }}次院长办公会";
            }else if (ele_id === 'DB_mulu') {
                data_list = {{ DbAllList | safe }};
                dir_title = "{{ now_year }}年第{{ Db_meet_num }}次党委会";
            }else {
                data_list = {{ XzAllList | safe }};
                dir_title = "{{ now_year }}年第{{ Xz_meet_num }}次行政例会";
            }
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/system-setup/print_directory");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send("print_type="+ele_id+"&data_list="+JSON.stringify(data_list)+"&dir_title="+String(dir_title));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        window.open(JsonDate["data"][0]["file_path"]);
                    }
                }
             };
         }

        function will_fun(iss_type) {
            var iss_id_list = [];
            var file_name = "";
            if (iss_type === "yb"){
                file_name = document.getElementById("yb_title").innerText;
                var check_box_list = document.getElementsByClassName("check-box");
                for (var i=0; i<check_box_list.length; i++){
                    if (check_box_list[i].checked){
                        iss_id_list.push(check_box_list[i].id);
                    }
                }
            }
            if (iss_type === "db"){
                file_name = document.getElementById("db_title").innerText;
                var check_box_list2 = document.getElementsByClassName("check-box1");
                for (var j=0; j<check_box_list2.length; j++){
                    if (check_box_list2[j].checked){
                        iss_id_list.push(check_box_list2[j].id);
                    }
                }
            }
            if (iss_type === "xz"){
                file_name = document.getElementById("xz_title").innerText;
                var check_box_list3 = document.getElementsByClassName("check-box3");
                for (var a=0; a<check_box_list3.length; a++){
                    if (check_box_list3[a].checked){
                        iss_id_list.push(check_box_list3[a].id);
                    }
                }
            }

            if (iss_id_list.length === 0){
                document.getElementById("loading").style.display = "none";
                alert("请选择议题！");
                return false
            }
            online_tag(iss_type, iss_id_list, file_name)
        }


        function primary_file(primary_type) {
            var iss_id_list = [];
            var file_name = "";
            if (primary_type === "yb"){
                file_name = document.getElementById("yb_title").innerText;
                var check_box_list = document.getElementsByClassName("check-box");
                for (var i=0; i<check_box_list.length; i++){
                    if (check_box_list[i].checked){
                        iss_id_list.push(check_box_list[i].id);
                    }
                }
            }
            if (primary_type === "db"){
                file_name = document.getElementById("db_title").innerText;
                var check_box_list2 = document.getElementsByClassName("check-box1");
                for (var j=0; j<check_box_list2.length; j++){
                    if (check_box_list2[j].checked){
                        iss_id_list.push(check_box_list2[j].id);
                    }
                }
            }
            if (primary_type === "xz"){
                file_name = document.getElementById("xz_title").innerText;
                var check_box_list3 = document.getElementsByClassName("check-box3");
                for (var a=0; a<check_box_list3.length; a++){
                    if (check_box_list3[a].checked){
                        iss_id_list.push(check_box_list3[a].id);
                    }
                }
            }

            if (iss_id_list.length === 0){
                document.getElementById("loading").style.display = "none";
                alert("请选择议题！");
                return false
            }

            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('get', "/personal-center/primary_pdf?file_name="+String(file_name)+"&iss_type="+String(primary_type)+"&iss_id_list="+JSON.stringify(iss_id_list), true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send();
            xhr.onload = function () {
                if (xhr.status === 200) {
                    var JsonDate = JSON.parse(xhr.responseText);
                    if (JsonDate["code"] === 404) {
                        Generate_files(primary_type, 'pdf', JsonDate["file_path"], iss_id_list, file_name);
                    }
                    else {
                        download_pdf(JsonDate["file_path"], file_name);
                    }
                }
             };
        }

        function download_pdf(file_path, file_name) {
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('get', "/personal-center/download_pdf?pdf_path="+String(file_path), true);
            xhr.send();
            xhr.responseType = "blob";
            xhr.onload = function () {
                if (xhr.status === 200) {
                    document.getElementById("loading").style.display = "none";
                    var blob = this.response;
                    var reader = new FileReader();
                    reader.readAsDataURL(blob); // 转换为base64，可以直接放入a标签href
                    reader.onload = function(e){
                        var a = document.createElement('a');
                        a.download = file_name+"-会议资料.pdf";
                        a.href = e.target.result;
                        $("body").append(a);
                        a.click();
                        $(a).remove();
                    };
                }
             };
        }

        function close_models() {
            document.getElementById("new_models1").style.display = "none";
        }

        function close_models3() {
            document.getElementById("new_models2").style.display = "none";
        }

        function model_line(ele_id) {
            document.getElementById("new_models2").style.display = "table-row";
            document.getElementById("iss_summit_but3").setAttribute("onclick", "IssueNotes('"+ele_id+"')")
        }

        lay('#version').html('-v' + laydate.v);

        //执行一个laydate实例
        laydate.render({
            elem: '#time_start' //指定元素
        });

        function will_meeting(iss_type, iss_id_list, file_name) {
            var meeting_time = document.getElementById("time_start").value;
            var meeting_adress =  $('#meeting_root option:selected').val();
            var notification = $("input[type=radio][name=notification]:checked").val();
            var ConferenceHost = document.getElementById("ConferenceHost").value;
            if (ConferenceHost === '0') {
                alert("请选择会议主持人！");
                return false
            }
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            var attending_leaders = ''
            if (iss_type === 'yb') {
                var post_url = "/announcements/HospitalOfficeMeeting"
                var AttendingLeadersList = document.getElementsByClassName('AttendingLeaders')
                for (var ii=0; ii<AttendingLeadersList.length; ii++) {
                    if (AttendingLeadersList[ii].checked) {
                        attending_leaders = attending_leaders + AttendingLeadersList[ii].value + ','
                    }
                }
            }else if (iss_type === 'db') {
                post_url = "/announcements/PartyOfficeMeeting"
            }else {
                post_url = "/personal-center/Confirmation"
            }
            xhr.open('post', post_url, true);
            {#xhr.open('post', "/personal-center/Confirmation", true);#}
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send('iss_type='+String(iss_type)+"&notification="+String(notification)+"&meeting_adress="+String(meeting_adress)+"&meeting_time="+String(meeting_time)+"&id_list="+JSON.stringify(iss_id_list)+"&file_name="+String(file_name)+"&ConferenceHost="+String(ConferenceHost)+"&attending_leaders="+String(attending_leaders));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        alert("文件已发送至领导处！");
                        close_models();
                        location.reload();
                    }
                }
             };
        }

        function check_all_select(chose_id) {
            var check_box_list = document.getElementsByClassName("check-box");
            if (document.getElementById(chose_id).checked){
                for (var i=0; i<check_box_list.length; i++){
                    check_box_list[i].checked=true;
                }
            }else {
                for (var t=0; t<check_box_list.length; t++){
                    check_box_list[t].checked=false;
                }
            }
        }

        function check_all_select1(chose_id) {
            var check_box_list = document.getElementsByClassName("check-box1");
            if (document.getElementById(chose_id).checked){
                for (var i=0; i<check_box_list.length; i++){
                    check_box_list[i].checked=true;
                }
            }else {
                for (var t=0; t<check_box_list.length; t++){
                    check_box_list[t].checked=false;
                }
            }
        }

        function check_all_select2(chose_id) {
            var check_box_list = document.getElementsByClassName("check-box2");
            if (document.getElementById(chose_id).checked){
                for (var i=0; i<check_box_list.length; i++){
                    check_box_list[i].checked=true;
                }
            }else {
                for (var t=0; t<check_box_list.length; t++){
                    check_box_list[t].checked=false;
                }
            }
        }

        function check_all_select3(chose_id) {
            var check_box_list = document.getElementsByClassName("check-box3");
            if (document.getElementById(chose_id).checked){
                for (var i=0; i<check_box_list.length; i++){
                    check_box_list[i].checked=true;
                }
            }else {
                for (var t=0; t<check_box_list.length; t++){
                    check_box_list[t].checked=false;
                }
            }
        }

        function DownloadExcel(primary_type) {
            var iss_id_list = [];
            var file_name = "";
            if (primary_type === "yb"){
                file_name = document.getElementById("yb_title").innerText;
                var check_box_list = document.getElementsByClassName("check-box");
                for (var i=0; i<check_box_list.length; i++){
                    if (check_box_list[i].checked){
                        iss_id_list.push(check_box_list[i].id);
                    }
                }
            }
            if (primary_type === "db"){
                file_name = document.getElementById("db_title").innerText;
                var check_box_list2 = document.getElementsByClassName("check-box1");
                for (var j=0; j<check_box_list2.length; j++){
                    if (check_box_list2[j].checked){
                        iss_id_list.push(check_box_list2[j].id);
                    }
                }
            }
            if (primary_type === "xz"){
                file_name = document.getElementById("xz_title").innerText;
                var check_box_list3 = document.getElementsByClassName("check-box3");
                for (var a=0; a<check_box_list3.length; a++){
                    if (check_box_list3[a].checked){
                        iss_id_list.push(check_box_list3[a].id);
                    }
                }
            }

            if (iss_id_list.length === 0){
                document.getElementById("loading").style.display = "none";
                alert("请选择议题！");
                return false
            }

            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('get', "/personal-center/download_excel?file_name="+String(file_name)+"&iss_type="+String(primary_type)+"&iss_id_list="+JSON.stringify(iss_id_list), true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send();
            xhr.onload = function () {
                if (xhr.status === 200) {
                    var JsonDate = JSON.parse(xhr.responseText);
                    if (JsonDate["code"] === 404) {
                        document.getElementById("loading").style.display = "none";
                        Generate_files(primary_type, 'excel', JsonDate["file_path"], iss_id_list, file_name);
                    }else {
                        download_excel(file_name, primary_type, JsonDate["file_path"])
                    }
                }
             };
        }

        function download_excel(file_name, primary_type, file_path) {
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('get', "/personal-center/download_excel_file?file_name="+String(file_name)+"&file_path="+String(file_path), true);
            xhr.send();
            xhr.responseType = "blob";
            xhr.onload = function () {
                if (xhr.status === 200) {
                    document.getElementById("loading").style.display = "none";
                    var blob = this.response;
                    var reader = new FileReader();
                    reader.readAsDataURL(blob); // 转换为base64，可以直接放入a标签href
                    reader.onload = function(e){
                        var a = document.createElement('a');
                        a.download = file_name+"-会议目录.xlsx";
                        a.href = e.target.result;
                        $("body").append(a);
                        a.click();
                        $(a).remove();
                    };
                }
             };
        }

        function pass_yb(tic_id) {
            document.getElementById("loading").style.display = "inline-block";
            var is_yb = "";
            if (document.getElementById(tic_id).checked){
                is_yb = true;
            }
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/personal-center/pass_yb", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("tic_id="+String(tic_id.replace("CC-", ''))+"&is_yb="+String(is_yb));
            xhr.responseType = "blob";
            xhr.onload = function () {
                if (xhr.status === 200) {
                    document.getElementById("loading").style.display = "none";
                    alert("修改成功！")
                }
             };
        }

        function page_zhanshi(is_type) {
            if (is_type === 'yb') {
                document.getElementById('page_one').style.display = 'inline-block';
            }else if (is_type === 'db'){
                document.getElementById('page_two').style.display = 'inline-block';
            }else {
                document.getElementById('page_three').style.display = 'inline-block';
            }
        }

        function page_yincang(is_type) {
            if (is_type === 'yb') {
                document.getElementById('page_one').style.display = 'none';
            }else if (is_type === 'db'){
                document.getElementById('page_two').style.display = 'none';
            }else {
                document.getElementById('page_three').style.display = 'none';
            }
        }

        function Generate_files(iss_type, download_type, file_path, iss_id_list, file_name) {
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/personal-center/GenerateFiles", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send('iss_type='+String(iss_type)+"&id_list="+JSON.stringify(iss_id_list)+"&file_name="+String(file_name));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (download_type === "pdf"){
                            download_pdf(JsonDate["pdf_path"], file_name);
                        }else {
                            download_excel(file_name, iss_type, JsonDate["excel_path"])
                        }
                    }
                }
            };
        }

        function page_meet() {
            document.getElementById('Meeting').style.display = 'inline-block';
        }

        function page_meet_none() {
            document.getElementById('Meeting').style.display = 'none';
        }

        function cx_sh_yb() {
            var sh_yes_list = document.getElementsByClassName("check-box");
            var yes_list = new Array();
            for (var sh=0; sh<sh_yes_list.length; sh++){
                if (sh_yes_list[sh].checked){
                    yes_list.push(sh_yes_list[sh].id);
                }
            }
            if (!yes_list.length) {
                alert("请选择临时上回议题！")
                return false
            }
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/announcements/HospitalOfficeMeetingTemporary", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("id_list="+JSON.stringify(yes_list)+"&sh_type=yb");
            xhr.onload = function () {
                if (xhr.status === 200) {
                    document.getElementById("loading").style.display = "none";
                    var JsonDate = JSON.parse(xhr.responseText);
                    if (JsonDate['code'] === 200){
                        alert("添加成功！");
                        location.reload();
                    }else {
                        alert(JsonDate['message']);
                    }
                }
             };
        }

        function cx_sh_dw() {
            var sh_yes_list = document.getElementsByClassName("check-box1");
            var yes_list = new Array();
            for (var sh=0; sh<sh_yes_list.length; sh++){
                if (sh_yes_list[sh].checked){
                    yes_list.push(sh_yes_list[sh].id);
                }
            }
            if (!yes_list.length) {
                alert("请选择临时上回议题！")
                return false
            }
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/announcements/PartyOfficeMeetingTemporary", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("id_list="+JSON.stringify(yes_list)+"&sh_type=db");
            {#xhr.responseType = "blob";#}
            xhr.onload = function () {
                if (xhr.status === 200) {
                    document.getElementById("loading").style.display = "none";
                    var JsonDate = JSON.parse(xhr.responseText);
                    if (JsonDate['code'] === 200){
                        alert("添加成功！");
                        location.reload();
                    }else {
                        alert(JsonDate['message']);
                    }
                }
             };
        }

        function cx_sh_xz() {
            var sh_yes_list = document.getElementsByClassName("check-box3");
            var yes_list = new Array();
            for (var sh=0; sh<sh_yes_list.length; sh++){
                if (sh_yes_list[sh].checked){
                    yes_list.push(sh_yes_list[sh].id);
                }
            }
            if (!yes_list.length) {
                alert("请选择临时上回议题！")
                return false
            }
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/personal-center/topic_discussion.html", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("id_list="+JSON.stringify(yes_list)+"&sh_type=xz");
            xhr.responseType = "blob";
            xhr.onload = function () {
                if (xhr.status === 200) {
                    alert("添加成功！");
                    document.getElementById("loading").style.display = "none";
                    location.reload();
                }
             };
        }

        function IssueNotes(ele_id) {
            var shelve = $("input[type=radio][name=shelve]:checked").val();
            var remarks = document.getElementById("remarks").value;
            if (!remarks) {
                alert("请填写备注！");
                return false
            }
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/personal-center/IssueRemarks", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("iss_id="+String(ele_id)+"&shelve="+String(shelve)+"&remarks="+remarks);
            xhr.onload = function () {
                if (xhr.status === 200) {
                    alert("操作成功！");
                    document.getElementById("loading").style.display = "none";
                    location.reload();
                }
             };
        }
        
        function IssueShelved() {
            var iss_type = document.getElementsByClassName("tab_top top_tag")[0].innerText;
            if (iss_type === "院办议题") {
                iss_type = "yb"
            }else if (iss_type === '党办议题') {
                iss_type = "db"
            }else {
                iss_type = "xz"
            }
            window.location.href='Issue_Shelved.html?iss_type='+iss_type;
        }
    </script>
{% endblock %}
